<!DOCTYPE html>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css">
<title>Captive</title>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>


<script>
	
	$(document).ready(
		function() {
			document.getElementById("dialog").style.display="inherit";
			document.getElementById("background").style.display="inherit";
			document.getElementById("dialog").innerHTML = "I say: <br/>What do you mean? You faked the kidnapping?";
			$("#dialog").click(dialog1);
		}
	);
	
	function dialog1()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>Yeah, are you surprised?";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2);
		}
	}
	
	function dialog2()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>Why are you doing this?";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog3);
		}
	}
	
	function dialog3()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says sadly: <br/>I.....I just want you to care about me, Dad. I know your job and your company were important, but sometimes....I wish I wasn't your son. Actually, I don't even feel like I'm your son. You were never there when I needed you.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog4);
		}
	}
	
	function dialog4()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>Jimmy, I'm sorry. I....I had no choice. You know that. You know I work hard so you can have a better life style. And the people at the company. They need me!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog5);
		}
	}
	
	function dialog5()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says sadly: <br/>I guess I understand. I just thought....I don't know....I thought maybe I could find a way to fix it.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog6);
		}
	}
	
	function dialog6()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>Faking a kidnapping is not the solution.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog7);
		}
	}
	
	function dialog7()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>I know...That's why I made up my mind. I'm not going back.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog8);
		}
	}
	
	function dialog8()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>What? No! Jimmy, please come back!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog9);
		}
	}
	
	function dialog9()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>No, Dad. As long as the company is there, you won't have time for me. Don't worry; Stephen will take care of me. I wish...I wish you are happy with what you do. Bye, Dad.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog10);
		}
	}
	
	function dialog10()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>Wait! Jimmy!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog11);
		}
	}
	
	function dialog11()
	{
		$("#dialog").unbind('click');
		document.getElementById("dialog").innerHTML = "(Jimmy hangs up the phone)";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog12);
		}
	}
	
	function dialog12()
	{
		$("#dialog").unbind('click');
		document.getElementById("dialog").innerHTML = "Who is Stephen? I can't believe Jimmy decides to leave me....What have I done....";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(endscene);
		}
	}
	
	function endscene()
	{
		$("#dialog").unbind('click');
		$("#dialog").fadeOut(5000,nextscene);
	}
	
	function nextscene()
	{
		window.location = "theend.php";
	}
	
</script>



</head>

<body>


<div id="container">
	<div id="background"><img src="images/office.jpg" /></div>
	<div id="dialog">
	</div>
	<div id="people"><img id="peopleimage" src=""></div>
</div>




</body>
</html>